home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 21
/
CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso
/
CUCD
/
Readers
/
AutoWBPattern
/
s
/
AutoWBPattern.rx
Wrap
Text File
|
1998-01-25
|
3KB
|
105 lines
/* Change WBPattern based on any CDs present */
b=addlib("rexxsupport.library",0,-30,0)
call Delay(1)
Address Command 'SYS:c/copy SYS:c/Info RAM:'
vol=""
do while 1
/* Get volume name. */
Address Command 'ram:Info CD0: >Ram:cd'
x=open(in,"RAM:CD",'r')
lastvol=vol
do until eof(in)
vol=readln(in)
if word(vol,1)="CD0:" then leave
end
upper vol
If pos("NO DISK PRESENT",vol) > 0 then do
vol = ""
end
else do
vol=word(vol,words(vol))
end
x=close(in)
if vol ~= lastvol then do
done="N"
/* If no CD found then revert to default prefs. */
If vol="" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.prefs USE'
done="Y"
end
/* This section changes pattern when an Aminet Set 1 CD is inserted. */
If substr(vol,1,4)="SET1" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.set1 USE'
done="Y"
end
/* This section changes pattern when an Aminet Set 2 CD is inserted. */
If substr(vol,1,4)="SET2" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.set2 USE'
done="Y"
end
/* This section changes pattern when an Aminet Set 3 CD is inserted. */
If substr(vol,1,4)="SET3" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.set3 USE '
done="Y"
end
/* This section changes pattern when an Amiga Format CD is inserted. */
If substr(vol,1,4)="AFCD" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.afcd USE'
done="Y"
end
/* This section changes pattern when a CU Amiga CD is inserted. */
If substr(vol,1,4)="CUCD" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.cucd USE'
done="Y"
end
/* This section changes pattern when "World of A1200" CD is inserted. */
If substr(vol,1,5)="World" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.alt USE'
done="Y"
end
/* This section changes pattern when EMC Phase 1 CD is inserted. */
If substr(vol,1,10)="EMC_Phase1" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.emc1 USE'
done="Y"
end
/* This section changes pattern when EMC Phase 2 CD is inserted. */
If substr(vol,1,10)="EMC_Phase2" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.emc2 USE'
done="Y"
end
/* This section changes pattern when an Speccy CD is inserted. */
If substr(vol,1,6)="SPECCY" then do
Address Command 'SYS:Prefs/WBPattern FROM ENVARC:sys/WBPattern.spec USE'
done="Y"
end
/* If none of above, use prefs from CD if available. */
If done="N" then do
If Exists("CD0:Prefs/env-archive/sys/WBPattern.prefs") then do
Address Command 'SYS:Prefs/WBPattern FROM CD0:Prefs/env-archive/sys/WBPattern.prefs USE'
done="Y"
end
end
end
call Delay(1000)
end